home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / qw12inst.zip / 286.TEC next >
Text File  |  1991-05-20  |  17KB  |  324 lines

  1. ID:D2 DESQview on 8088, 8086, and 80286 Processors
  2. Quarterdeck Technical Note #195
  3. by Michael Bolton
  4.  
  5. Q.  On which processors will DESQview multitask?
  6. Q.  How will DESQview use the memory on my system?
  7.  
  8. Many users ask if DESQview can multitask on a 286 machine.  The fact is,
  9. DESQview can multitask on ANY processor in the Intel 8086 family, or its
  10. compatibles.  This includes the 8088, the 8086, the NEC V20 and V30, the
  11. 80286, the 80386 (in both the SX and DX flavors), and the i486 and
  12. i486SX.  DESQview 386 is simply DESQview and Quarterdeck ExPANded Memory
  13. Manager (QEMM-386) in the same box.  On a 386 machine, QEMM-386's memory
  14. management makes DESQview's job easier, but the DESQview half of
  15. DESQview 386 is EXACTLY THE SAME as the stand-alone version of DESQview;
  16. not one byte of code is different.
  17.  
  18. On 286 or lesser processors, DESQview's ability to multitask is limited
  19. only by the amount of conventional and exPANded memory available, and by
  20. certain hardware considerations.  This White Paper will outline how
  21. DESQview uses and manages memory, will detail some of the constraints
  22. involved with the 286 and lesser processors, and will explain why the
  23. 386 architecture is so important in terms of memory management and
  24. multitasking.  Please note that the 386SX, the 386DX, the i486, and the
  25. i486SX can all be considered as essentially the same chip for the
  26. purposes of this discussion; all have the same memory management
  27. features.
  28.  
  29. DESQview uses memory in the following ways:
  30.  
  31. Conventional Memory
  32. ===================
  33.  
  34. DESQview will run, and multitask programs, in available conventional
  35. memory.  Regrettably, DOS, device drivers, memory resident programs, and
  36. the like all use conventional memory.  When DESQview is loaded, it too
  37. will use conventional memory if there is no extra memory available.  On
  38. a typical system with all of the above loaded, the largest memory
  39. available for multitasking will be the amount of memory remaining --
  40. generally about 400K.  As many programs as can fit in this memory will
  41. run concurrently (that is, they will truly multitask), but in this day
  42. of ever-larger applications, it is impossible for multiple large
  43. programs to fit into this space.  When DESQview no longer has room in
  44. memory for the next application to be loaded, the program used least
  45. recently is swapped out, either to exPANded memory, to a virtual disk
  46. (if the virtual disk's drive letter is specified in the appropriate
  47. place in DESQview's Setup), or to a hard disk.  Although the program
  48. will stop running while it is swapped out, when you switch back to it,
  49. it will pick up where it left off.  In this context, DESQview performs
  50. as a task-switcher.
  51.  
  52. This, combined with DESQview's other features, is more desirable for
  53. most users than having to save the work in progress, exit the first
  54. program, and reload the next.  Nevertheless, it is clearly more
  55. desirable still to allow programs to continue running, even when they
  56. are in background.  To do this with multiple large programs, DESQview
  57. uses exPANded memory.
  58.  
  59.  
  60. ExPANded Memory
  61. ===============
  62.  
  63. If exPANded memory is available, DESQview will use it for multitasking.
  64. Not just any exPANded memory will do.  DESQview needs EEMS or EMS 4.0
  65. exPANded memory hardware for multitasking; this is because software
  66. emulation of exPANded memory (on a 286 or lesser processor) cannot
  67. provide the memory management which is needed for real multitasking.
  68. Software CAN be used to activate the dramatically improved memory
  69. management features built right into the 386 chip, but extra hardware is
  70. needed for the 80286 and its predecessors.
  71.  
  72. If you have EMS (only one E) 3.2 exPANded memory hardware on your
  73. system, DESQview can use it to STORE program code and data, but not to
  74. RUN programs.  This is much faster than swapping programs to disk and
  75. makes DESQview a very fast and powerful task-switcher.  Again, though,
  76. programs which are swapped to exPANded memory will stop running.
  77.  
  78. Owners of EEMS (two Es) or EMS 4.0 hardware are in a much better
  79. position for multitasking, since this type of hardware is capable of
  80. mapping conventional memory (of which more later, in the section titled
  81. "Backfilling"). Note that any of the following provides exPANded memory
  82. suitable for multitasking on a 286:
  83.  
  84. 1) an EEMS or EMS 4.0 board that is able to (and set up to) provide
  85.    memory to conventional memory addresses and make that memory mappable
  86.    -- this will also work on an 8088 or 8086 processor; or,
  87.  
  88. 2) a 286 memory management unit, such as the All ChargeCard or the SOTA Pop
  89.    Card.
  90.  
  91. 3) an 80386, 80386SX, or i486 upgrade with an appropriate memory manager
  92.    such as QEMM-386.
  93.  
  94. Note also that each of the above items involves some sort of hardware
  95. add-on to an 8088, 8086, or 80286.
  96.  
  97. The following DO NOT provide memory suitable for multitasking on
  98. a 286 or less:
  99.  
  100. 1) an EMS 4.0 emulator; that is, a software driver that turns exTENded
  101.    memory into simulated exPANded memory; or,
  102.  
  103. 2) an EMS 4.0 board that only provides software support for EMS 4.0, and
  104.    which does not allow memory on the board to be mapped to addresses
  105.    below 640K; or,
  106.  
  107. 3) an EMS 3.2 board, whether it has an EMS 4.0 software driver or not; or,
  108.  
  109. 4) a board that provides only exTENded memory; or,
  110.  
  111. 5) the exTENded memory on a 286 motherboard.
  112.  
  113.  
  114. ExTENded Memory
  115. ===============
  116.  
  117. DOS's addressing limit is 1 megabyte (MB), from 0KB to 1024KB.  Of
  118. this, the lower 640K of addresses are used for conventional memory; the
  119. upper 384K of address are reserved for various system resources.  On a
  120. typical 286, there is no usable memory connected to these higher
  121. addresses between 640K and 1024K, except for BIOS ROMs, display
  122. adapters, video cards, and the like.  Most addresses in this region have
  123. no memory attached to them at all.  Confusion often stems from the fact
  124. that many 286s come with 384K of exTENded memory.  EXTENDED
  125. MEMORY IS ADDRESSED AFTER THE 640K TO 1024K REGION, ABOVE 1024K --
  126. outside of DOS's address space entirely.  Consequently, this memory is
  127. invisible to most DOS programs, except those in a special class called
  128. DOS-exTENded applications.  Disk caches, RAM disks, print spoolers, and
  129. the like can store data in exTENded memory, and DOS-exTENded
  130. applications can run their code in exTENded memory, but exTENded memory
  131. is not usable for running regular DOS programs.
  132.  
  133. Once again, on the 386 chip, the situation is very different.  Under the
  134. control of a 386 memory manager such as QEMM-386, and a multitasking
  135. program like DESQview, exTENded memory can be converted to exPANded
  136. memory, and can therefore be made useful for running and multitasking
  137. regular DOS applications.  This is due once again to the hardware built
  138. into the 386 chip; the 286 lacks these features, and needs extra
  139. hardware to provide them.  THIS, AND NOT SPEED, IS THE CRUCIAL
  140. DIFFERENCE BETWEEN THE 286 AND 386 ARCHITECTURE.
  141.  
  142. With Quarterdeck's exTENded memory driver, QEXT.SYS, DESQview can load
  143. nearly 64K of itself into the first 64K of exTENded memory, thanks to an
  144. idiosyncracy of the 286 processor.  The net effect of this is to reduce
  145. DESQview's conventional memory overhead by nearly 64K.
  146.  
  147.  
  148. Backfilling
  149. ===========
  150.  
  151. When a program accesses a piece of memory, say at address 6000:0000
  152. (henceforth, simply 6000), memory on the motherboard at address 6000 is
  153. made available to the program.  If, on the other hand, there is NO
  154. MEMORY on the motherboard at this address, the request goes out to
  155. boards in the expansion slots, and the exPANded memory board has the
  156. opportunity to supply the memory for that address from its pool of
  157. exPANded memory.  Therefore, if you want an exPANded memory board,
  158. rather than motherboard memory, to provide memory to conventional memory
  159. addresses, it becomes necessary to first disable motherboard memory.  If
  160. the exPANded memory board is under the control of a powerful program
  161. like DESQview, the board can then be instructed to supply DIFFERENT
  162. portions of exPANded memory to the processor at different times.
  163. Supplying memory from an exPANded memory board to replace disabled
  164. motherboard memory is called "backfilling" -- because memory is replaced
  165. from the top of conventional memory (usually 640K) to some lower
  166. address.
  167.  
  168. When a program starts under DESQview's control on a system backfilled
  169. with exPANded memory, DESQview runs that program in conventional memory
  170. -- conventional memory supplied not by the motherboard, but by the
  171. exPANded memory board.  When a second program is opened, DESQview looks
  172. at how much memory that program needs.  If the program cannot fit in
  173. conventional memory along with the first program, DESQview tells the EMS
  174. board two things.  First, it tells the EMS board to allocate an amount
  175. of exPANded memory equivalent to the size of the program.  Then it maps
  176. that chunk of exPANded memory into DOS's address space, and the program
  177. runs in that exPANded memory.  The program which was previously running
  178. stays in its memory space on the exPANded memory card -- it just is not
  179. visible to DOS.  The new program runs in a different memory space on the
  180. card, and IS visible to DOS, because DESQview and the EMS board tell DOS
  181. that.  Only one program appears to be below 640K at a time; DESQview
  182. manages which one.
  183.  
  184. Since the EMS board is supplying memory to addresses below 640K, the
  185. program running in exPANded memory is unaware of any of this, and runs
  186. as if it were in conventional memory.  Then, after a suitable amount of
  187. time, DESQview stops the second program, and the EMS board then is
  188. requested to map the memory allocated to the first program back into
  189. conventional memory addresses.  This process repeats, allowing both
  190. programs a portion of the processor's time.  If this seems clumsy and
  191. inefficient, remember that all this is happening at processor speed, and
  192. is therefore almost impossible for the user to notice.  When a third
  193. program is started, DESQview tells the exPANded memory board to allocate
  194. another chunk of exPANded memory, and each of the three programs gets a
  195. slice of time to do its work.
  196.  
  197. Note that this process will only work if there is no conventional memory
  198. on the motherboard to intercept the various calls for address (in our
  199. example) 6000. If there IS memory on the motherboard at that address,
  200. the exPANded memory board will never receive the call, and DESQview
  201. won't be able to run programs in exPANded memory.  Therefore, it is best
  202. to be able to deactivate as much conventional memory as possible.
  203. Disabling memory is done by setting switches or jumpers on the
  204. motherboard, and/or by running your computer's setup program; the manual
  205. for your system should tell you how this is done.  Almost all
  206. motherboards will allow you to disable 128K of memory, and many will
  207. permit disabling conventional memory down to 256K.  In this instance,
  208. the EMS board will supply memory to addresses from 256K to 640K, for a
  209. total of 384K.  Here DESQview will allow the first program opened to be
  210. as large as available conventional memory (minus the overhead discussed
  211. above), and each subsequent program can be as large as 384K in size.
  212.  
  213. On some motherboards, you are permitted to disable conventional memory
  214. right down to 0K; this is relatively rare, but makes life very
  215. comfortable for DESQview.  In this scenario, DESQview can multitask
  216. multiple programs which are as large as available conventional memory --
  217. which is the ideal.  Another compelling feature of 80386SX, 80386, and
  218. i486 processors is that they can act as if they have their memory
  219. disabled down to 0K without actually disabling any memory--and this is
  220. one of the main reasons that the 386 architecture is so popular for
  221. multitasking.
  222.  
  223. Note also that on 286s that are using a memory management unit (the All
  224. Chargecard or the SOTA Pop Card, as mentioned above), the effect is the
  225. same as being able to disable conventional memory to 0K.
  226.  
  227. If the "Largest Available exPANded Memory" field in DESQview's Memory
  228. Status program is "0" (or 0K) immediately after you start DESQview, then
  229. you either do NOT have the right kind of exPANded memory board or you
  230. have not set it up to provide exPANded memory to conventional memory
  231. addresses below 640K.  Again, refer to the documentation for your
  232. computer and for your exPANded memory board.
  233.  
  234.  
  235. Display
  236. =======
  237.  
  238. There are more than just memory constraints involved in multitasking
  239. on a 286 or less.  Programs can display their information in two ways:
  240. they can ask DOS or the system's BIOS (Basic Input-Output Services) to
  241. do it for them, or they can write directly to the screen hardware.  The
  242. former type of program is called "well-behaved" in DESQview parlance.
  243. Programs which write text directly to screen without going through DOS
  244. or the BIOS, and all programs which display graphics, are called
  245. (predictably) "misbehaved" because such programs, running in background,
  246. will overwrite information in the foreground window.  There is a third
  247. type of program, called "DESQview/TopView-aware."  This sort of program
  248. will automatically write to the alternate video buffer if it detects
  249. that it is running under DESQview or TopView; otherwise, it will write
  250. directly to screen -- the best of both worlds.
  251.  
  252. In some cases, misbehaved programs can be configured through their own
  253. setup routines to write through DOS or the BIOS, in which case DESQview
  254. can redirect screen writes to an area of memory which DESQview sets up
  255. called the alternate video buffer.  DESQview has also, for several
  256. years, included loaders for some of the most popular misbehaved
  257. programs; these loaders trap output from misbehaved programs and direct
  258. it to the alternate video buffer.
  259.  
  260. On a 286 or less, if your program cannot be configured to be
  261. well-behaved, and if there is no DESQview loader for it, its output will
  262. "bleed through" to the foreground screen unless you stop it from running
  263. in background.
  264.  
  265. On a 386 processor, regardless of a program's behavior, DESQview 386
  266. can "virtualize" the screen.  Virtualization causes a program which
  267. writes directly to screen to write elsewhere, with the
  268. practical upshot that it can be run in background or in a small
  269. window.  See VIRTUAL.TEC and DIRECTLY.TEC, two other Quarterdeck White
  270. Papers, for more information on this.  Note that this feature is not
  271. available on a system running anything less than a 386SX processor,
  272. nor is it available without DESQview 386 (that is, DESQview and
  273. QEMM-386 on the same system).
  274.  
  275.  
  276. More Information
  277. ================
  278.  
  279. The manual for Quarterdeck's Manifest program is an excellent
  280. introduction to memory management -- Manifest's purpose is to show you
  281. how the memory on your machine is configured, how to best take
  282. advantage of what you have, and how to improve it.  Manifest is included
  283. with every copy of QRAM and QEMM-386 (and thus it's included with every
  284. copy of DESQview 386 as well), and is available separately if you wish;
  285. all of these packages are available at your favourite dealer. Many of
  286. the other Quarterdeck White Papers contain information related to the
  287. topics discussed here; one of the White Papers, BOOKS.TEC, contains a
  288. good list of books on various topics related to memory management and
  289. multitasking.
  290.  
  291.  
  292. Summing Up
  293. ==========
  294.  
  295. Regardless of the processor, DESQview will multitask as many programs as
  296. will fit in conventional and EMS 4 or EEMS exPANded memory.  Even on an 8088
  297. with 640K of memory, this power is not to be underestimated; for example,
  298. there are several excellent communications programs on the market that will
  299. run under DESQview in very little memory, allowing you to download in
  300. background and use a text editor at the same time.  DESQview also provides
  301. macro and dialer facilities, and powerful Mark and Transfer features which
  302. allow you to move information easily from one window to another.  The
  303. DESQview Companions, our suite of desktop accessories, can all fit into
  304. less than 200K of memory simultaneously.
  305.  
  306. DESQview is a very powerful multitasker, and will provide excellent
  307. performance on 80286 and 8086/8088 machines IF YOU CONSIDER THE
  308. LIMITATIONS OF THESE PROCESSORS.  If you provide DESQview with EMS 3.2
  309. exPANded memory, it will work faster;  if you put EMS 4.0 or EEMS
  310. memory on the system, and disable as much motherboard memory as
  311. possible, DESQview will perform better still.
  312.  
  313. Nothing compares to a 386, however.  It's much faster; when QEMM-386 is
  314. in the system, it requires no special hardware to provide exPANded
  315. memory; and it has virtualization and protection features which keep
  316. multiple programs out of each other's hair.  On the other hand, if you
  317. own DESQview, you already own half of DESQview 386, and all you'll
  318. require when you upgrade your hardware is the other half -- Quarterdeck
  319. ExPANded Memory Manager 386 (QEMM-386)!  Get started now, and get a
  320. taste for multitasking!
  321.  
  322.             Copyright (C) 1991 by Quarterdeck Office Systems
  323.                  * * *   E N D   O F   F I L E    * * *
  324.